package com.motu.vertx.module.utility.commondata;

import io.vertx.core.json.JsonObject;

public class LoginlimitModel
{
	protected int id; //ID
	protected int type; //限制类型 (1限制注册 2限制登陆)
	protected int platform; //限制platform
	protected int channel; //限制channel
	protected String version; //限制版本号
	protected String devicewhitelist; //设备ID白名单 (jsonarray)
	protected String devicetype; //限制设备类型

	public LoginlimitModel() {
	}

	public LoginlimitModel(JsonObject obj) {
		id = obj.containsKey("id") ? obj.getInteger("id") : 0;
		type = obj.containsKey("type") ? obj.getInteger("type") : 0;
		platform = obj.containsKey("platform") ? obj.getInteger("platform") : 0;
		channel = obj.containsKey("channel") ? obj.getInteger("channel") : 0;
		version = obj.containsKey("version") ? obj.getString("version") : "";
		devicewhitelist = obj.containsKey("devicewhitelist") ? obj.getString("devicewhitelist") : "";
		devicetype = obj.containsKey("devicetype") ? obj.getString("devicetype") : "";
	}

	public int getId() {
		return id;
	}

	public int getType() {
		return type;
	}

	public int getPlatform() {
		return platform;
	}

	public int getChannel() {
		return channel;
	}

	public String getVersion() {
		return version;
	}

	public String getDevicewhitelist() {
		return devicewhitelist;
	}

	public String getDeviceType() {
		return devicetype;
	}

}
